﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace RandomGenerator
{
    public partial class RandomGenerator : System.Web.UI.Page
    {
        protected void ButtonSubmit_Click(object sender, EventArgs e)
        {
            int start = int.Parse(firstNumber.Value);
            int end = int.Parse(secondNumber.Value);
            Random rand = new Random();
            int random = rand.Next(start, end);
            result.Value = random.ToString();
        }
    }
}